
/**
 *	\file Definition of the NMN_BREAKPOINT macro.
 *	\author Sean Tromans
 */

#ifndef	NMN_BREAKPOINT_HPP
#define	NMN_BREAKPOINT_HPP

#include <boost/config.hpp>

/**
 *	Cross platform macro to trigger a breakpoint from code.
 *	\author Sean Tromans
 */
#define	NMN_BREAKPOINT( )	NMN_BREAKPOINT_IMPL( )

#if	defined(BOOST_MSVC)

#define NMN_BREAKPOINT_IMPL( )	__debugbreak( )

#else

//	Default to infinite loop on unrecognised platforms.
#define	NMN_BREAKPOINT_IMPL( )	for(;;) { }

#endif

#endif	//NMN_BREAKPOINT_HPP